let Strategy={
	nowYearArr:[],//当年日K数据
	preYearMax:0,//上年最大值
	preYearMin:0,//上年最小值
	historyMonthMaxArr:[],//历年高位所在月份
	historyMonthMinArr:[],//历年低位所在月份
	
	culBuySellPoint:function(){
		let arr = [];
		for(let i =7;i<this.nowYearArr.length;i++){
			    let pars = this.getNowMaxMin(this.nowYearArr,i);
				let price = parseFloat(this.nowYearArr[i][1]);
				let dayBuySell = this.checkData(price,this.preYearMax,this.preYearMin,this.historyMonthMaxArr,this.historyMonthMinArr,pars);
				dayBuySell.day = this.nowYearArr[i][0];
				dayBuySell.price = this.nowYearArr[i][2];
				arr.push(dayBuySell);
		}
		return arr;
	},
	getNowMaxMin:function(nowYearArr,idx){
		let max=0;
		let min=99999999;
		for(let i = 0;i<idx;i++){
			let res = nowYearArr[i];
			let r3 = parseFloat(res[3]);
			let r4 = parseFloat(res[4]);
			max = r3>max?r3:max;
			min =r4<min?r4:min;
		}
		max=parseFloat(max);
		min=parseFloat(min);
		let avg = (max+min)*0.5;
		return {max:max,min:min,avg:avg};
	},
	checkData:function(nowPrice,preYearMax,preYearMin,historyMonthMaxArr,historyMonthMinArr,nowYearMaxMin){
		     let preYearAvg = (preYearMax+preYearMin)*0.5;
			 let sellTotal,buyTotal;
			 //上年40%;
			 sellTotal = nowPrice>preYearMax?40:(nowPrice>preYearAvg?20:0); 
			 buyTotal = nowPrice<preYearMin?40:(nowPrice<preYearAvg?20:0);
			 //今年30%
			 sellTotal += nowPrice>nowYearMaxMin.max?30:(nowPrice>nowYearMaxMin.avg?15:0);
			 buyTotal+= nowPrice<nowYearMaxMin.min?30:(nowPrice<nowYearMaxMin.avg?15:0);
			 //历年月份30%
			 let month = new Date().getMonth()+1;
			 month = month<10?"0"+month:month;
			 
			 for(let i=0;i<historyMonthMinArr.length;i++){
				 if(historyMonthMinArr[i][month]){
					 buyTotal+= i==0?30:(i==1?30*0.666:30*0.333);
				 }
			 }
			 
			 for(let i=0;i<historyMonthMaxArr.length;i++){
			 	if(historyMonthMaxArr[i][month]){
			 		 sellTotal+= i==0?30:(i==1?30*0.666:30*0.333);
			 	}
			 }
			 
			 return {buy:buyTotal,sell:sellTotal};
	}
}